<?php
class Users extends CI_Controller {
	
	function __construct() {
		// load controller parent
		parent::__construct();
		// load 'Users' model
		$this->load->model('Users_model');
	}
	
	function index() {
		// store data for being displayed on view file
		$data ['users'] = $this->Users_model->getAllUsers();
		$data ['numusers'] = $this->Users_model->getNumUsers();
		$data ['title'] = 'Displaying user data';
		$data ['header'] = 'User List';
//		// load 'users_view' view
		$this->load->view ('users_view',$data);
	}
}
?>